<!DOCTYPE HTML>
<html lang="zh">
<head>
  @include('user.public.heads')
  <link href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>

<div class="container">
      <p class="bg-info btn btn-block" id="show">加载更多</p>
      <ul class="list-unstyled">
        {!! $str !!}
      </ul>
</div>

</body>
</html>
<script type="text/javascript">
document.getElementsByTagName('body')[0].scrollTop=document.getElementsByTagName('body')[0].scrollHeight;
var page = 1;
var load = false;
$("#show").click(function(){
  if(load == false){
      $.get('{{ url('Interlocution') }}', {page : page+1}, function (data) {
      if(data.str != null){
        $(".list-unstyled").prepend(data.str);
        page++;
      }else{
        load = true;
        $("#show").text('已无更多');
      }
    },'json');
  }
});
</script>
